Advanced Function Presentation (AFP) is a format used to store print data for print jobs. According to AFP standards, a print job is divided into AFP objects. Each AFP object may define a part of the print job, such as a document, a page, an image, text, etc. Furthermore, AFP objects may be nested within each other. For example, an AFP document object may include multiple AFP page objects, and each AFP page object may include multiple text and/or graphical objects.
Each AFP print job may be associated with metadata. Metadata is contextual information that describes the print job. For example, metadata may indicate an author of the print job, may indicate a preferred rasterization algorithm to use while processing the print job, or may indicate any other suitable characteristic of the print job. One exemplary format for metadata is defined by the Metadata Object Content Architecture (MOCA) standards set by the AFP Consortium.
Each MOCA object within AFP print data is stored as one or more Object Container Data (OCD) structured fields that are bounded by a Begin Object Container (BOC) structured field and an End Object Container (EOC) structured field. The first OCD structured field for the MOCA object stores a MOCA header, and this MOCA header describes a format for the MOCA object, a type of metadata held by the MOCA object, etc. A MOCA header is often between about fifty and three hundred bytes in size. Large AFP print jobs may include hundreds of thousands, or even millions of MOCA objects, each having its own header.